
package LoadFromDatabase;

import java.io.File;
import java.io.FileWriter;

public class WriteData {
    public static void write(String data, String fileName){
        try{
            File file = new File(fileName);
            FileWriter fileWriter = new FileWriter(file);
            fileWriter.write(data);
            fileWriter.flush();
            fileWriter.close();
        }catch(Exception ex){
            ex.printStackTrace();
        }
    }
}
